]> dgit.raspbian.org Git - gnome-shell.git/commit
shell-app: Do not allocate memory during GSpawnChildSetupFunc
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Tue, 30 Apr 2024 21:45:04 +0000 (23:45 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 24 May 2024 23:12:44 +0000 (01:12 +0200)
commitf6c161ec6e3afe183c41f8ade950c832eaa47d19
treeacbd810782735d47701250d257fc35b900f16f10
parent5ddc97d6300f18a36f034e8b808ce8719886dfb1
shell-app: Do not allocate memory during GSpawnChildSetupFunc

The child context setup function used as launch GSpawnChildSetupFunc
uses g_object_get that internally potentially allocates memory, making
it not async-signal-safe and so not something that is safe to use in
between fork and exec, so just use the simpler getter here.

Note that the current implementation of app_child_setup() is safe
already as sd_journal_stream_fd, dup2 and close are so.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3293>
(cherry picked from commit dcb5956dea9c46720feaa1773ca9488327e34f51)
src/shell-app.c